﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace STF.Blog.Model
{

    /// <summary>
    /// 用户表
    /// </summary>
    public class Users : BaseEntity
    {
        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(50), Column(TypeName = "varchar(50)")]
        [Display(Name = "电子邮件")]
        public string Email { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(50), Column(TypeName = "varchar(50)")]
        [Display(Name = "密码")]
        public string Pwd { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(50), Column(TypeName = "varchar(50)")]
        [Display(Name = "昵称")]
        public string NickName { get; set; }

        [Required(ErrorMessage ="{0}不能为空")]
        [Display(Name ="状态码")]
        public int StateCode { get; set; } = 0;
    }
}